import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/home.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    // 首页
    {
      path: '/home',
      name: 'home',
      component: HomeView
    },

    // 注册登录
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/login.vue')
    },
    {
      path: '/details',
      name: 'details',
      component: () => import('../views/details.vue')
    },
    {
      path: '/forgot',
      name: 'forgot',
      component: () => import('../views/forgot.vue')
    },
    {
      path: '/register',
      name: 'register',
      component: () => import('../views/register.vue')
    },
  ]
})

export default router
